package com.vil.mapper;

import java.util.List;

import com.vil.entity.Admin;
import com.vil.entity.Village;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface VillageMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Village record);

    int insertSelective(Village record);

    Village selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Village record);

    int updateByPrimaryKey(Village record);
    
  //判断小区是否存在
    @Select("select count(1) from village where name = #{name}")
    int isExist(@Param("name")String name);

    List<Village> getListByManyConditions(Village  village );

    List<Village> getListByManyCondition(String name);
    //获取小区名
    List<String> getListVillageName();

    //批量删除
    int deleteMany(Long[] array);

    List<Village> getListVillage();


}